import Vue from 'vue'
import App from './App.vue'
import ElementUI from "element-ui";
import 'element-ui/lib/theme-chalk/index.css';

import httpRequest from "./utils/httpRequest"
import router from './router'
import Axios from 'axios'

import VueDragResize from 'vue-drag-resize';


Vue.component('vue-drag-resize', VueDragResize)
import store from './store'
import MetaInfo from 'vue-meta-info'
Vue.use(ElementUI);
Vue.use(MetaInfo)
import './core/global-component'
Vue.config.productionTip = false;
import '@/styles/index.scss' // global css
var apiUrl="";
import './icons'
if(process.env.NODE_ENV == 'development'){
  apiUrl = "http://192.168.1.89:8009/";
} else {
  apiUrl = window.location.protocol +"//" + window.location.host+"/";
}
Vue.prototype.apiUrl = apiUrl
Axios.defaults.baseURL = apiUrl;
Vue.prototype.$http = httpRequest // ajax请求方法
new Vue({
  render: h => h(App),
  router,
  store,
  mounted () {
    document.dispatchEvent(new Event('render-event'))
  }
}).$mount('#app')
